package com.rongchuan.wt.config;

import com.dangdang.ddframe.job.lite.config.LiteJobConfiguration;
import com.dangdang.ddframe.job.lite.spring.api.SpringJobScheduler;
import com.dangdang.ddframe.job.reg.base.CoordinatorRegistryCenter;
import com.rongchuan.wt.job.EmployeeJob;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BusinessJobConfig {

//    @Bean(initMethod = "init")
//    public SpringJobScheduler initEmployeeJob(CoordinatorRegistryCenter registryCenter, EmployeeJob employeeJob){
//        LiteJobConfiguration jobConfiguration =
//                ElasticJobUtil.createDefaultSimpleJobConfiguration(employeeJob.getClass(), employeeJob.getCron());
//        SpringJobScheduler springJobScheduler =
//                new SpringJobScheduler(employeeJob, registryCenter,jobConfiguration );
//        return springJobScheduler;
//    }
}
